<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>梦芭莎</title>
		<link rel="stylesheet" type="text/css" href="__ROOT__/Index/Common/css/head_end.css" />
		<link rel="stylesheet" type="text/css" href="__ROOT__/Index/Common/css/list.css" />
		<link rel="stylesheet" type="text/css" href="__ROOT__/Index/Common/css/side_bar.css"/>
		<script type="text/javascript" src="__ROOT__/Index/Common/js/jquery-3.2.1.min.js"></script>
		<script type="text/javascript" src="__ROOT__/Index/Common/js/head_end.js"></script>
	</head>

	<body>
		<div class="head"><include file="./Index/Common/public/header.html" /></div>
		<div class="list_wrap">
			<div class="list_content">
				<div class="list_nav">
					<a href="">首页</a>
					>
					<a href="">新品上线</a>
					<span>(共175件)</span>
				</div>
				<div class="list_l">
					<div class="ll_left">
						<div class="ll_l_c">
							<h3><img src="//i1.mbscss.com/list/topimg/0922.jpg" alt="" /></h3>
							<div class="ll_l_dt">
								<dl>
									<dt><a href="">最新上线(171)</a></dt>
									<dd>
										<a href="">2017春季新品(30)</a>
										<a href="">2017夏季产品(8)</a>
										<a href="">2016冬季产品(69)</a>
										<a href="">2016秋季产品(64)</a>
									</dd>
								</dl>

								<dl>
									<dt><a href="">最新上线(171)</a></dt>
									<dd>
										<a href="">2017春季新品(30)</a>
										<a href="">2017夏季产品(8)</a>
										<a href="">2016冬季产品(69)</a>
										<a href="">2016秋季产品(64)</a>
									</dd>
								</dl>

								<dl>
									<dt><a href="">最新上线(171)</a></dt>
									<dd>
										<a href="">2017春季新品(30)</a>
										<a href="">2017夏季产品(8)</a>
										<a href="">2016冬季产品(69)</a>
										<a href="">2016秋季产品(64)</a>
									</dd>
								</dl>
							</div>
						</div>

						<!--热卖排行-->
						<div class="ll_l_list hotTop">
							<h2><span>Hot!</span>热卖排行榜</h2>
							<ul>
								<volist name='hotList' id='vo' offset='0' length='3'>
									<li>
										<volist name='vo.color_img' id='v' offset='0' length='1'>
											<a href="__APP__/Detail/index?id={$vo.id}"><img src="{$v}"/></a>
										</volist>
										<p class="item_title">{$vo.name}</p>
										<p class="item_price">￥{$vo.n_price}</p>
									</li>
								</volist>
							</ul>
						</div>

						<!--最近浏览-->
						<div class="ll_l_list Recent">
							<h2>最近浏览记录</h2>
							<ul>
								<li>
									<a href=""><img src="http://images.ing2ing.com/ProductImg//8/1702/middle/105117201-009-01-M.jpg"/></a>
									<p class="item_title">Ing2Ing欧美大气简约</p>
									<p class="item_price">￥99.00</p>
								</li>
								<li>
									<a href=""><img src="http://images.ing2ing.com/ProductImg/8/1604/middle/105016406-009-01-M.jpg"/></a>
									<p class="item_title">Ing2Ing欧美个性拼接</p>
									<p class="item_price">￥99.00</p>
								</li>
							</ul>
						</div>
					</div>
				</div>
				<div class="list_r">
					<!--热卖推荐-->
					<div class="hot_buy">
						<h3>热卖推荐</h3>
						<ul>
							<volist name='hotList' id="vo" offset='0' length='4'>
								<li>
									<volist name='vo.color_img' id='v' offset='0' length='1'>
										<a href=""><img src="{$v}"/></a>
									</volist>
									<p>
										<span>{$vo.name}</span>
										<em><i>￥</i><font>{$vo.n_price}</font></em>
										<a class="buy" href="__APP__/Detail/index?id={$vo.id}">立即抢购</a>
									</p>
								</li>
							</volist>
						</ul>
					</div>

					<!--右侧分类-->
					<div class="right_sort">
						<div class="r_sort">
							<dl>
								<dt>品类</dt>
								<dd>
									<div class="ddcontent">
										<span><a href="">女装<i>(96)</i></a></span>
										<span><a href="">男装<i>(79)</i></a></span>
									</div>
								</dd>
							</dl>
							<dl>
								<dt>性别</dt>
								<dd>
									<div class="ddcontent">
										<span><a href="">女<i>(96)</i></a></span>
										<span><a href="">男<i>(79)</i></a></span>
									</div>
								</dd>
							</dl>
							<dl>
								<dt>颜色</dt>
								<dd>
									<div class="ddcontent">
										<span class="color"><a href=""><img src="http://i1.mbscss.com/img/search/2012/color/黑色.jpg" alt="" /></a></span>
										<span class="color"><a href=""><img src="http://i1.mbscss.com/img/search/2012/color/灰色.jpg" alt="" /></a></span>
										<span class="color"><a href=""><img src="http://i1.mbscss.com/img/search/2012/color/蓝色.jpg" alt="" /></a></span>
										<span class="color"><a href=""><img src="http://i1.mbscss.com/img/search/2012/color/绿色.jpg" alt="" /></a></span>
										<span class="color"><a href=""><img src="http://i1.mbscss.com/img/search/2012/color/红色.jpg" alt="" /></a></span>
										<span class="color"><a href=""><img src="http://i1.mbscss.com/img/search/2012/color/橙色.jpg" alt="" /></a></span>
										<span class="color"><a href=""><img src="http://i1.mbscss.com/img/search/2012/color/黄色.jpg" alt="" /></a></span>
										<span class="color"><a href=""><img src="http://i1.mbscss.com/img/search/2012/color/其他.jpg" alt="" /></a></span>
										<span class="color"><a href=""><img src="http://i1.mbscss.com/img/search/2012/color/粉红.jpg" alt="" /></a></span>
										<span class="color"><a href=""><img src="http://i1.mbscss.com/img/search/2012/color/紫色.jpg" alt="" /></a></span>
										<span class="color"><a href=""><img src="http://i1.mbscss.com/img/search/2012/color/印花.jpg" alt="" /></a></span>
									</div>
								</dd>
							</dl>
							<dl class="dl display">
								<dt>尺寸</dt>
								<dd>
									<div class="ddcontent">
										<span><a href="">L<i>(166)</i></a></span>
										<span><a href="">M<i>(166)</i></a></span>
										<span><a href="">S<i>(166)</i></a></span>
										<span><a href="">XL<i>(166)</i></a></span>
										<span><a href="">29<i>(166)</i></a></span>
										<span><a href="">33<i>(166)</i></a></span>
										<span><a href="">34<i>(166)</i></a></span>
										<span><a href="">30<i>(166)</i></a></span>
										<span><a href="">32<i>(166)</i></a></span>
										<span><a href="">31<i>(166)</i></a></span>
										<span><a href="">25<i>(166)</i></a></span>
										<span><a href="">26<i>(166)</i></a></span>
										<span><a href="">27<i>(166)</i></a></span>
										<span><a href="">28<i>(166)</i></a></span>
									</div>
								</dd>
							</dl>
							<dl class="dl display">
								<dt>风格</dt>
								<dd>
									<div class="ddcontent">
										<span><a href="">时尚休闲<i>(100)</i></a></span>
										<span><a href="">潮酷<i>(32)</i></a></span>
										<span><a href="">欧美潮牌<i>(31)</i></a></span>
										<span><a href="">其他<i>(16)</i></a></span>
										<span><a href="">运动街头<i>(1)</i></a></span>
										<span><a href="">欧美风范<i>(1)</i></a></span>
										<span><a href="">美式休闲<i>(1)</i></a></span>
										<span><a href="">街头<i>(1)</i></a></span>
									</div>
								</dd>
							</dl>
						</div>
						<div class="expand">
							<img onclick="show_dl()" class="down" src="http://i0.mbscss.com/img/search/2012/06/27/rolldown.jpg" alt="" />
							<img onclick="hide_dl()" class="on display" src="http://i0.mbscss.com/img/moonbasa/2014/04/10/sous.jpg" alt="" />
						</div>
					</div>

					<!--商品 排序-->
					<div class="filter">
						<div class="top_filter">
							<div class="sort_box">
								<div class="topdiv">
									<a href="">
										<span>默认</span>
										<img src="http://i2.mbscss.com/img/search/20140226/c_down.png" alt="" />
									</a>
								</div>
								<div class="topdiv">
									<a href="">
										<span>销量</span>
										<img src="http://i2.mbscss.com/img/search/20140226/c_down.png" alt="" />
									</a>
								</div>
								<div class="topdiv">
									<a href="">
										<span>好评</span>
										<img src="http://i2.mbscss.com/img/search/20140226/c_down.png" alt="" />
									</a>
								</div>
								<div class="topdiv">
									<a href="">
										<span>最新</span>
										<img src="http://i2.mbscss.com/img/search/20140226/c_down_h.png" alt="" />
									</a>
								</div>
								<div class="topdiv">
									<a href="">
										<span>价格</span>
										<img src="http://i2.mbscss.com/img/search/20140226/c_up.png" alt="" />
									</a>
								</div>
								<div class="topdiv">
									<a href="">
										<span>价格</span>
										<img src="http://i2.mbscss.com/img/search/20140226/c_down.png" alt="" />
									</a>
								</div>
							</div>
								<div class="choose_price">
									<div class="priceText">
										<span>
										<input id="lprice" type="text" maxlength="8" placeholder="￥" />
										</span>
											<i>-</i>
											<span>
											<input id="hprice" type="text" maxlength="8" placeholder="￥" />
										</span>
									</div>
									<div class="choose_btn">
										<a onclick="clear_v()" href="javascript:void(0)">清空</a>
										<a class="red" href="javascript:void(0)">确定</a>
									</div>
								</div>
				`			
								<!-- -------不知道有什么用  -->
								<div class="filter_"></div>

							</div>
						<div class="page_list">
							<strong>共<b>175</b>个商品</strong>
							<span><b>1</b>/2</span>
							<a href=""><</a>
							<a href="">></a>
						</div>
					</div>
					
					<!--商品列表-->
					<div class="chapList">
						<volist name='goodslist' id='vo'>
							<dl>
								<dt>
									<!----------------不同颜色切换------------------->
									<a href="__APP__/Detail/index?id={$vo.id}">
										<volist name="vo.color_img" id="v" offset="0" length='1'>
											<img src="{$v}" />
										</volist>
									</a>
									<div class="sizebox">
										<span><b>尺码:</b><b>S</b>|<b>M</b>|<b>L</b></span>
										<img src="http://i0.mbscss.com/img/search/2013/01/31/hide.jpg" alt="" />
									</div>
									<div class="colorIndex">
										<volist name="vo.color_img" id="v">
											<a class="" href="javascript:void(0)"><img src="{$v}"/></a>
										</volist>
									</div>
								</dt>
								<dd>
									<span><font>￥{$vo.n_price}</font><del>￥{$vo.b_price}</del></span>
									<a href="">{$vo.name}</a>
									<a href=""><strong>评论<b>{$vo.commentNum}条</b></strong></a>
								</dd>
							</dl>
										
						</volist>
					</div>
					
					<!--分页-->
					<!--<div class="page_num">-->
						<!--<div class="num_list">-->
							<!--<a class="paginationCurrentIndex" href="">1</a>-->
							<!--<a class="paginationIndex" href="">2</a>-->
							<!--<span class="paginationSimplifyInfo">1/2</span>-->
							<!--<a class="paginationNext" href="">下一页>></a>-->
						<!--</div>-->
					<!--</div>-->
				</div>
			</div>
		</div>	
		<div class="foot"><include file="./Index/Common/public/footer.html" /></div>
		<div class="side"><include file="./Index/Common/public/side_bar.html" /></div>
	</body>
	<script type="text/javascript" src="__ROOT__/Index/Common/js/list.js"></script>
<script>




		$.ajax({
			url:"__APP__/Order/sidecar",
			type:"post",
			dataType:"json",
			success:function(data){
				console.log(data);
				$('.sidebar .num').html(data.length);
				var html="";
				var goods_num=0;
				var price=0;
				for(var i=0;i<data.length;i++){
					var gid=data[i].goodsId;
					var siz = data[i].color;
					var col = data[i].color;
					html+='<div class="classify_item">'+
						'<div class="item_pic">'+
							'<a href="__APP__/detail/index?id='+data[i].goodsId+'"><img width="34" src='+data[i].img+' alt="" /></a>'+
						'</div>'+
						'<div class="item_des">'+
							'<p><a href="__APP__/detail/index?id='+data[i].goodsId+'">'+data[i].name+'</a></p>'+
							'<p><span class="i_size">'+data[i].size+'</span><b class="i_color">'+data[i].color+'</b></p>'+
							'<p class="del_hover">'+
								'<span onclick="del_Car('+data[i].goodsId+',$(this))" class="itemDes-del">删除</span>'+
								'<span class="font_color">￥'+data[i].n_price+'</span><span>*'+data[i].goodsNum+'</span>'+
							'</p>'+
						'</div>'+
					'</div>';
					goods_num+=~~data[i].goodsNum;
					var danjia = ~~data[i].n_price;
					var shuliang = ~~data[i].goodsNum;
					console.log(danjia,shuliang);
					var xiaoji = danjia*shuliang;
					price+=xiaoji;
					console.log(price);
				}
				$('.classify_con').html(html);
				$('.zongShu').html(goods_num);
				$('.zongjiaqian').html(price);
			}
		})
		function del_Car(gId,_this){
			var  goodsId = gId;
			console.log(goodsId);
			var size = _this.parent().parent().find('.i_size').html();
			var color = _this.parent().parent().find('.i_color').html();
			console.log(color);
			$.ajax({
				url:"__APP__/Order/delete",
				type:"post",
				dataType:"json",
				data:{
					goodsId,
					size,
					color
				},
				success:function(data){
					console.log(data);
					if(data.status==1){
						window.location.href="__APP__/Index/index";
					}
				}
			})
		}
</script>	
</html>
	
